package cn.wolfcode.luowowo.comment.domain;


import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@Document("scenic_comment")
public class ScenicComment implements Serializable{
    public static final int NEVER_GO = 1;//千万别去
    public static final int NOT_RECOMMENDED = 2;//不推荐
    public static final int SO_SO = 3;//一般般
    public static final int  WORTH_GOING  = 4;//值得一去
    public static final int RECOMMEND  = 5;//必须推荐

    public static final int TYPE_COMMON = 0;//普通点评
    public static final int TYPE_COMMENT = 1;//点评的评论
    public static final int TYPE_REPLY = 2;//评论的评论

    @Id
    private String _id;
    private String scenicId;//景点id

    //用户相关
    private Long userId;
    private String username;
    private int level;
    private String headUrl;

    //点评相关
    private Date createTime;    //创建时间
    private String content;     //点评内容
    private int rank = 0;     //点评星数
    private int type = 0;       //点评类型
    private String refCommentId;//评论所关联点评
    private String replyUsername;//所回复用户的名字

    private List<ScenicComment> refScenicComments = new ArrayList<>();//点评包含的评论
}
